﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PHMEE.Admin
{
    /// <summary>
    /// 波形请求数据
    /// </summary>
    [Serializable]
    public class WaveDataReqDto : PackBaseDto<byte>
    {
        /// <summary>
        /// 通道号
        /// </summary>
        public int ChNo { get; set; }
        /// <summary>
        /// 波形方向(0-无方向；1-Z轴；2-X轴；3-Y轴)
        /// </summary>
        public SernorStyleEnum Dir { get; set; }
        /// <summary>
        /// 指标类型(1-长波形;11-高频加速度;12-低频加速度;15-速度波形)
        /// </summary>
        public VibIndexEnum Code { get; set; }
        /// <summary>
        /// 报警等级
        /// </summary>
        public int? AlarmLevel { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime Time { get; set; }
        // 格式化的时间字符串
        public string FormattedTime => Time.ToString("yyyy-MM-dd HH:mm:ss");
        /// <summary>
        /// 长度
        /// </summary>
        public int Length { get; set; }
        /// <summary>
        /// 附加长度
        /// </summary>
        public int PlusLength { get; set; }
        /// <summary>
        /// 频率
        /// </summary>
        public int Freq { get; set; }
        /// <summary>
        /// 转速(RPM)(有线)
        /// </summary>
        public int RPM { get; set; }
        /// <summary>
        /// 转速时标
        /// </summary>
        public int TimeMark { set; get; }
        /// <summary>
        /// 转换系数
        /// </summary>
        public float Coef { set; get; }
        /// <summary>
        /// 校验码，建议最后一包给出
        /// </summary>
        public uint CRC { set; get; }
        /// <summary>
        /// 0:触发采集与定时采集并行,1:默认，2:加速度触发，3：速度触发，4：转速触发，5：加速度/转速触发，6：速度/转速，7：冲击触发，8：启机触发，9：温度触发
        /// </summary>
        public int Src { set; get; }
        /// <summary>
        /// 0:未接传感器的空采数据，1：传感器数据
        /// </summary>
        public int IsSensor { set; get; }
    }
}
